/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sesion.ejb;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.Remove;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;

/**
 *
 * @author Administrador
 */
public class Inter {
    @PostConstruct
    public void construye(InvocationContext i){
        System.out.println("PostConstruct:"+i.getTarget());
    }
    @Remove
    public void remueve(InvocationContext i){
        System.out.println("Remove:"+i.getTarget());
    }
    @PreDestroy
    public void destruye(InvocationContext i){
        System.out.println("PreDestroy:"+i.getTarget());
    }
    
    @AroundInvoke
    public void mensaje(){
        System.out.println("Estamos en mensaje 2");
    }

}
